#ifndef ASSESSMENTDETAILVIEW_H
#define ASSESSMENTDETAILVIEW_H

#include <QWidget>
#include <QTableWidget>
#include <QVBoxLayout>
#include <QLabel>
#include <QDateEdit>
#include <QPushButton>
#include <QHBoxLayout>
#include <QComboBox>

class EmployeeManager;

class AssessmentDetailView : public QWidget
{
    Q_OBJECT

public:
    explicit AssessmentDetailView(EmployeeManager *manager, const QString &empId = "", QWidget *parent = nullptr);
    ~AssessmentDetailView();

    // 设置员工ID
    void setEmployeeId(const QString &empId);

private slots:
    // 期间选择变化时的处理
    void onPeriodChanged(const QString &text);

private:
    // 初始化UI
    void initUI();

    // 加载考核详情
    void loadAssessmentDetails();

    // 搜索考核详情
    void onSearchAssessment();

private:
    EmployeeManager *m_manager;
    QString m_empId;

    // UI组件
    QTableWidget *m_assessmentTable;
    QLabel *m_statusLabel;
    QDateEdit *m_startDateEdit;
    QDateEdit *m_endDateEdit;
    QPushButton *m_searchButton;
    QComboBox *m_periodComboBox;
};

#endif // ASSESSMENTDETAILVIEW_H
